﻿using System;
using Windows.Foundation;

namespace Padsurface.App.Tests.Unit.Stubs
{
    public class AsyncOperationStub<T> : IAsyncOperation<T>
    {
        private readonly T _results;

        public AsyncOperationStub(T results)
        {
            _results = results;
        }

        public AsyncOperationCompletedHandler<T> Completed
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public T GetResults()
        {
            return _results;
        }

        public void Cancel()
        {
            throw new NotImplementedException();
        }

        public void Close()
        {
            throw new NotImplementedException();
        }

        public Exception ErrorCode
        {
            get { throw new NotImplementedException(); }
        }

        public uint Id
        {
            get { throw new NotImplementedException(); }
        }

        public AsyncStatus Status
        {
            get { return AsyncStatus.Completed; }
        }
    }
}
